{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290
{\fonttbl\f0\fnil\fcharset0 Monaco;\f1\fmodern\fcharset0 Courier;\f2\fnil\fcharset128 KozGoPro-Heavy;
}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs20 \cf0 This project allows for compilation of aMule in Xcode \ul without\ulnone  macports / fink. THIS IS NOT AN EASY PROCESS, so only attempt it if you're familiar with the terminal, and compiling programs there, as wxWidgets and cryptopp are still compiled via the terminal. I hope to automate this process in the future to eliminate that requirement.\
\
Compiling aMule on Xcode is important to automate the build of different configurations, ensure proper compatibility, and allow developers to use the Xcode interface to gdb which is tremendously useful to track and solve bugs. \
\
Current configuration supports i386/ppc build on SDK 10.4 (for Tiger), without country flags or UPnP, using wxWidgets 2.8.x. Other configurations will be added later.\
\
It's important for building that the following steps/requirements are met:\
\
1) This folder structure is needed for compilation:\
  \
  <some folder in your computer>\
	|\
	|-> aMule sources\
	|\
	|-> wxWidgets-2.8 (or wxWidgets for 2.9+)\
	|\
	|-> cryptopp (or cryptopp-64bits if you are using Snow Leopard and plan to use wxWidgets 2.9+ and SDK 10.6)\
	\
It's essential that the folders are named exactly like shown. If you want to change this, take a look at CFLAGS and link flags in the "aMule" target's properties.\
\
2) wxWidgets has to be compiled with universal binary support and static library. When using wxWidgets 2.8 on Snow Leopard, it's important that gcc-4.0 is used because gcc-4.2 defaults to 64bits builds, which wxWidgets 2.8.x doesn't support (see {\field{\*\fldinst{HYPERLINK "http://wiki.wxwidgets.org/Development:_wxMac#Building_on_Snow_Leopard_for_Snow_Leopard"}}{\fldrslt http://wiki.wxwidgets.org/Development:_wxMac#Building_on_Snow_Leopard_for_Snow_Leopard}} for more info).\
\
Personally I check out the sources using the following:\
\
\pard\pardeftab720\ql\qnatural

\f1\fs24 \cf0 svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH wxWidgets-2.8\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs20 \cf0 for wxWidgets 2.8, and\
\
\pard\pardeftab720\ql\qnatural

\f1\fs24 \cf0 svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/ wxWidgets
\f0\fs20 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
for wxWidgets 2.9+, and configure with\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f1\fs24 \cf0 ./configure  CC=gcc-4.0 CXX=g++-4.0 LD=g++-4.0 --enable-debug --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4 --enable-universal_binary --disable-universal --disable-shared \
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs20 \cf0 for wxWidgets 2.8, and\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f1\fs24 \cf0 ./configure --enable-unicode --disable-shared --enable-debug --enable-debug_gdb --with-osx_cocoa --with-macosx-version-min=10.6
\f0\fs20 \
\
for wxWidgets 2.9+ on Snow Leopard for SDK 10.6.\

\f1\fs24 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs20 \cf0 After that, just type "make" as usual. Do not "make install".\
\
3) Compiling cryptopp is complicated due to lack of proper support for building on MacOSX, especially for universal binaries. First download a cryptopp release from {\field{\*\fldinst{HYPERLINK "http://www.cryptopp.com/#download"}}{\fldrslt http://www.cryptopp.com/#download}} (latest are at the bottom) and uncompress it to the folder named "cryptopp" or "cryptopp-64bits" as shown in the folder structure above. If you are using wxWidgets 2.9+, then configure and compile as usual. If using wxWidgets 2.8 in Snow Leopard, edit the file named GNUmake and add the following lines at the beginning:\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f1\fs24 \cf0 CXXFLAGS = -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -DNDEBUG -g -O2\
LDFLAGS = -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4\
CXX=c++-4.0\
CC=gcc-4.0\
\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural

\f0\fs20 \cf0 Save the file, then type "make" as usual. 
\f2\b\fs24 Do not "make install"
\f0\b0\fs20 .\
\
Once you have finished compiling cryptopp and wxWidgets, and they are in the right folders, this project should compile correctly. If you get errors, please review all the steps before posting in the forum.\
\
Good luck!
\f1\fs24 \
\pard\pardeftab720\ql\qnatural
\cf0 \
- Kry\
}